package com.hgsoft.entity;

public class SectionPf2 implements java.io.Serializable {

    private static final long serialVersionUID = 1L;
    private SectionPf sectionPf;
    private Integer usCapacity;
    private Integer dsCapacity;

    public SectionPf getSectionPf() {
	return sectionPf;
    }

    public void setSectionPf(SectionPf sectionPf) {
	this.sectionPf = sectionPf;
    }

    public Integer getUsCapacity() {
	return usCapacity;
    }

    public void setUsCapacity(Integer usCapacity) {
	this.usCapacity = usCapacity;
    }

    public Integer getDsCapacity() {
	return dsCapacity;
    }

    public void setDsCapacity(Integer dsCapacity) {
	this.dsCapacity = dsCapacity;
    }

    public String getUsFullRate() {
	String usFullRate = null;
	if(sectionPf != null && sectionPf.getUpsideNum() != null && usCapacity != null) {
	    Double d = (double)Math.round(Double.valueOf(sectionPf.getUpsideNum()) / usCapacity * 10000) / 100;
	    usFullRate = d + "%";
	}
	return usFullRate;
    }

    public String getDsFullRate() {
	String dsFullRate = null;
	if(sectionPf != null && sectionPf.getDownsideNum() != null && dsCapacity != null) {
	    Double d = (double)Math.round(Double.valueOf(sectionPf.getDownsideNum()) / dsCapacity * 10000) / 100;
	    dsFullRate = d + "%";
	}
	return dsFullRate;
    }
}
